package com.foreknow.test03;

import java.util.Scanner;

/**
 *
 */
public class LoopDemo1 {
    public static void main(String[] args) {
//        int i = 1;
//        while (i<=50){
//            int g = i%10;
//            int s = i/10%10;
//            if(i%7==0||(g==7||s==7)){
//                System.out.println(i);
//
//            }
//            i++;
//        }
        String name ="";
        double price =0.0;
        int goodsNo = 0;
        System.out.println("**************************");
        System.out.println("请输入商品编号：");
        System.out.println("1.AAAAA      2.BBBBBB     3.CCCCC");
        System.out.println("**************************");
        Scanner sc = new Scanner(System.in);
        String answer ="y";
        while ("y".equals(answer)){
        System.out.println("请输入商品编号：");
        goodsNo = sc.nextInt();
        switch (goodsNo) {
            case 1:
                name = "AAAAA";
                price = 245.0;
                break;
            case 2:
                name = "BBBB";
                price = 123.45;
            case 3:
                name = "CCCCCC";
                price = 456.50;

        }
        System.out.println(name+"---------"+price);
        System.out.println("是否继续（y/n）");
        answer =sc.next();
    }
        System.out.println("程序结束了，哈哈");
    }
}
